package cn.wangzengqiang.study.designpattern.observer.own;

/**
 * 订阅者：工一
 */
public class Gongyi implements Observer {
    private Subject subject;

    public Gongyi(Subject subject) {
        this.subject = subject;
        subject.registerObserver(this);
    }

    @Override
    public void update(String msg) {
        System.out.println(getClass().getSimpleName() + ",请您收看罗胖60s：" + msg);
    }
}
